home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
datatypes
/
hsn_dt
/
source
/
classbase.h
< prev
next >
Wrap
C/C++ Source or Header
|
1978-06-29
|
4KB
|
110 lines
/******************************************************************************
*
* HSN Datatype, based on the sourcecode found in OS3.1 Native Developer Kit
*
* Written by Christian Buchner
*
******************************************************************************
* classbase.h
*
*/
#include <dos/dos.h>
#include <dos/dosextens.h>
#include <exec/types.h>
#include <exec/ports.h>
#include <exec/memory.h>
#include <exec/lists.h>
#include <exec/devices.h>
#include <exec/semaphores.h>
#include <exec/execbase.h>
#include <devices/audio.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
#include <intuition/cghooks.h>
#include <intuition/gadgetclass.h>
#include <utility/tagitem.h>
#include <datatypes/datatypes.h>
#include <datatypes/datatypesclass.h>
#include <datatypes/soundclass.h>
#include <libraries/iffparse.h>
#include <string.h>
#include <dos.h>
#include <clib/macros.h>
#include <clib/dos_protos.h>
#include <clib/exec_protos.h>
#include <clib/intuition_protos.h>
#include <clib/utility_protos.h>
#include <clib/datatypes_protos.h>
#include <clib/dtclass_protos.h>
#include <pragmas/dos_pragmas.h>
#include <pragmas/exec_pragmas.h>
#include <pragmas/intuition_pragmas.h>
#include <pragmas/utility_pragmas.h>
#include <pragmas/datatypes_pragmas.h>
#include <pragmas/dtclass_pragmas.h>
/*****************************************************************************/
#define HSNDTCLASS "hsn.datatype"
/*****************************************************************************/
struct ClassBase
{
struct Library cb_Lib;
struct ExecBase *cb_SysBase;
struct Library *cb_DOSBase;
struct Library *cb_IntuitionBase;
struct Library *cb_UtilityBase;
struct Library *cb_DataTypesBase;
struct Library *cb_SuperClassBase;
BPTR cb_SegList;
struct SignalSemaphore cb_Lock; /* Access lock */
Class *cb_Class;
};
/*****************************************************************************/
#define ASM __asm
#define REG(x) register __ ## x
/*****************************************************************************/
#define SysBase cb->cb_SysBase
#define DOSBase cb->cb_DOSBase
#define UtilityBase cb->cb_UtilityBase
#define IntuitionBase cb->cb_IntuitionBase
#define DataTypesBase cb->cb_DataTypesBase
#define SuperClassBase cb->cb_SuperClassBase
/*****************************************************************************/
ULONG __stdargs DoMethodA (Object *obj, Msg message);
ULONG __stdargs DoMethod (Object *obj, unsigned long MethodID, ...);
ULONG __stdargs DoSuperMethodA (struct IClass *cl, Object *obj, Msg message);
ULONG __stdargs DoSuperMethod (struct IClass *cl, Object *obj, unsigned long MethodID, ...);
ULONG __stdargs CoerceMethodA (struct IClass *cl, Object *obj, Msg message);
ULONG __stdargs CoerceMethod (struct IClass *cl, Object *obj, unsigned long MethodID, ...);
ULONG __stdargs SetSuperAttrs (struct IClass *cl, Object *obj, unsigned long Tag1, ...);
/*****************************************************************************/
/* classbase.c */
Class *ASM ObtainClassEngine ( REG (a6 )struct ClassBase *cb );
struct Library *ASM LibInit ( REG (d0 )struct ClassBase *cb , REG (a0 )BPTR seglist , REG (a6 )struct Library *sysbase );
LONG ASM LibOpen ( REG (a6 )struct ClassBase *cb );
LONG ASM LibClose ( REG (a6 )struct ClassBase *cb );
LONG ASM LibExpunge ( REG (a6 )struct ClassBase *cb );
/* dispatch.c */
Class *initClass ( struct ClassBase *cb );
ULONG ASM Dispatch ( REG (a0 )Class *cl , REG (a2 )Object *o , REG (a1 )Msg msg );
BOOL ConvertObjectData ( struct ClassBase *cb , Class *cl , Object *o , struct TagItem *attrs );
ULONG setdtattrs ( struct ClassBase *cb , Object *o , ULONG data , ...);
ULONG getdtattrs ( struct ClassBase *cb , Object *o , ULONG data , ...);